//
//  SceneIconModel.m
//  YSSmartHome
//
//  Created by yanghao on 16/9/12.
//  Copyright © 2016年 yahaong. All rights reserved.
//

#import "SceneIconModel.h"

@implementation SceneIconModel


- (instancetype)initWithDict:(NSDictionary *)dict
{
    if (self = [super init]) {
        [self setValuesForKeysWithDictionary:dict];
    }
    return self;
}
+ (instancetype)iconWithDict:(NSDictionary *)dict
{
    return [[self alloc]initWithDict:dict];
}
+ (NSArray <SceneIconModel *>*)loadAllIcon
{
    NSArray *dictArray = [NSArray arrayWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"icon" ofType:@"plist"]];
    NSMutableArray *iconArray = [NSMutableArray array];
    for (NSDictionary *dict in dictArray) {
        SceneIconModel *icon = [SceneIconModel iconWithDict:dict];
        [iconArray addObject:icon];
        
    }
    return iconArray;
}
@end
